package org.springblade.task.base.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.task.base.entity.BaseUserClickLog;
import org.springblade.task.base.mapper.BaseUserClickLogMapper;
import org.springblade.task.base.param.BaseUserClickLogParam;
import org.springblade.task.base.service.IBaseUserClickLogService;
import org.springblade.task.base.vo.BaseUserClickLogVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Title: 用户点击
 * @version V1.0
 */
@Service
public class BaseUserClickLogServiceImpl extends ServiceImpl<BaseUserClickLogMapper, BaseUserClickLog> implements IBaseUserClickLogService {

	@Autowired
	BaseUserClickLogMapper baseUserClickLogMapper;

	/**
	 * 查询用户点击数
	 * @param logParam
	 * @return
	 */
	public Integer queryUserClickCount(BaseUserClickLogParam logParam) {
		return baseUserClickLogMapper.queryUserClickCount(logParam);
	}

	/**
	 * 查询用户点击加购物车数
	 * @param logParam
	 * @return
	 */
	public Integer queryUserClickShoppingCartCount(BaseUserClickLogParam logParam) {
		return baseUserClickLogMapper.queryUserClickShoppingCartCount(logParam);
	}

	/**
	 * 查询每日活动类型数据列表
	 * @param logParam
	 * @return
	 */
	public List<BaseUserClickLogVO> queryDailyActivityTypeList(BaseUserClickLogParam logParam) {
		return baseUserClickLogMapper.queryDailyActivityTypeList(logParam);
	}

	/**
	 * 查询书籍相关数据列表
	 * @param logParam
	 * @return
	 */
	public List<BaseUserClickLogVO> queryUserClickLogBookList(BaseUserClickLogParam logParam) {
		return baseUserClickLogMapper.queryUserClickLogBookList(logParam);
	}
}
